TOC file
The .TOC file format defines information about each addon installed, as well as specify which .xml file needs to be loaded. It is currently required for an addon to be recognized, show up in the addons list and be loaded. The TOC filename must match the folder name in order for it to be recognized by WoW. WoW reads up to the first 1024 characters of each line only. Additional characters are ignored and do not cause an error. = Where = World of Warcraft/Interface/AddOns/''MyAddon''/''MyAddon''.toc = Client Recognized Tags = Interface The interface number is a way of telling WoW which version of the client it was made for. If there is a version mismatch, the AddOn is disabled by default. However, if the user explicitly turns off version checking the AddOn will continue to function regardless of what the interface version number in the .TOC file says. To get what # to put read HOWTO: Get Current Interface Number ## Interface: 1800 Title This text is what is displayed in the AddOns list located during user selection. It also appears when you mouseover the name of the AddOn in the WoW Addons list. Localized versions can be included by appending a hyphen followed by the localization label. The appropriate label will be shown to the user. ## Title: My Addon ## Title-deDE: Titel ## Title-frFR: Titre Notes The message that appears under the AddOn name when you mouseover the name of the AddOn in the WoW AddOns list. Localized versions can be included by appending a hyphen followed by the localization label. The appropriate label will be shown to the user. ## Notes: This is my first AddOn. ## Notes-deDE: Informationen ## Notes-frFR: Texte RequiredDeps This metatag is to force the WoW client to only load this AddOn if a functional dependency exists on the system. Some AddOns make use of 3rd party libraries and AddOns in order to function properly. If any of the required dependencies are missing, the AddOn will fail to function. ## Dependencies: someAddOn, someOtherAddOn alternative use: ## RequiredDeps: someAddOn, someOtherAddOn OptionalDeps Optional dependencies are external libraries or AddOns which can be used by the AddOn to use and implement their functionality if they exist. If the optional dependencies are not found on the system, the AddOn will continue to function, however, the AddOn using Optional dependencies must be written to work without these dependencies in order for the AddOn to function without them. ## OptionalDeps: someAddOn, someOtherAddOn LoadOnDemand As of patch 1.7, AddOns can be loaded on demand rather than always loaded when the user first logs in. If this is enabled, this addon must be loaded by another addon at some later point. This is useful in saving memory by avoiding loading special-purpose addons. ## LoadOnDemand: 1 ## LoadOnDemand: 0 LoadWith New since patch 1.9. Together with LoadOnDemand, this gets your AddOn loaded when one of these AddOns (which would usually be Blizzard UI modules like Blizzard_AuctionUI) is loaded. ## LoadWith: someAddOn, someOtherAddOn SavedVariables Saved variables is now the current way of storing data in between sessions. These variables are loaded when the client is started, or when the UI is reloaded. The SavedVariables metatag now replaces the function RegisterForSave which is now no longer supported by the WoW client. Note that saved variables are not completely loaded during the OnLoad event and thus must be assumed to contain nil values until the event ADDON_LOADED has been invoked with arg1 set to the name of your Addon's folder. ## SavedVariables: someVariable, someOtherVariable SavedVariablesPerCharacter This tag behaves exactly like SavedVariables except that the variables are saved on a Per-Character basis. This tag only used to use character names to differentiate between characters, but now uses both the realm name and the character name. ## SavedVariablesPerCharacter: somePercharVariable DefaultState Determines whether or not this addon is enabled by default when installed. If it is set to disabled, the user must explicitly turn it on in the AddOns interface located during user selection. If this tag is not specified the default is enabled. ## DefaultState: enabled ## DefaultState: disabled Secure This header field was added to the Blizzard_ AddOns that are part of the default UI in 1.11. It's exact purpose is unknown, but one possibility is that it tells the client whether it should look for a signature for the AddOn or not. ## Secure: 1 = Non-Standard Tags = It is possible to add more information using the ## directive, and some 3rd party programs even make use of some information provided. Below are some commonly used in addons. AddOn Metadata Tags These fields, along with Title and Notes can be retreived using GetAddOnMetadata. Author The name of the Author. Used by some Tools like WoW Addon Manager. ## Author: MyName Version The version number is a way of telling WoW Addon Manager or other Tools which version of the Addon is installed. It is used to check if a newer version is available and if an update is necessary. ## Version: 1.0 X- Any field that starts with 'X-' ## X-email: Author@Domain.com ## X-Foo: I love pancakes ## X-Foo-esES: Te quiero, mi esposa Ace2 Comment Tags Unlike Ace, Ace2 picks up AddOn metadata directly from the TOC file. Special processing is done on certain fields, namely Version and X-Date, so that you can use CVS or Subversion keywords such as $Rev$ as their value. In addition to the regular fields, it will also look for the following custom fields. X-Date Release date of the AddOn. ## X-Date: 01-06-2006 X-eMail Email of the AddOn's author. ## X-eMail: officers@alexstraza.net X-Website Website of the AddOn ## X-Website: http://www.alexstraza.net X-Category Ace2 category of the AddOn. ## X-Category: Raid The categories are declared in AceAddon.lua. local CATEGORIES = { Bars" = "Action Bars", "Auction" = "Auction", "Audio" = "Audio", "Battlegrounds/PvP" = "Battlegrounds/PvP", "Buffs" = "Buffs", "Chat/Communication" = "Chat/Communication", "Druid" = "Druid", "Hunter" = "Hunter", "Mage" = "Mage", "Paladin" = "Paladin", "Priest" = "Priest", "Rogue" = "Rogue", "Shaman" = "Shaman", "Warlock" = "Warlock", "Warrior" = "Warrior", "Healer" = "Healer", "Tank" = "Tank", "Caster" = "Caster", "Combat" = "Combat", "Compilations" = "Compilations", Export" = "Data Export", Tools " = "Development Tools ", "Guild" = "Guild", Modification" = "Frame Modification", Enhancements" = "Interface Enhancements", "Inventory" = "Inventory", "Library" = "Library", "Map" = "Map", "Mail" = "Mail", "Miscellaneous" = "Miscellaneous", "Quest" = "Quest", "Raid" = "Raid", "Tradeskill" = "Tradeskill", "UnitFrame" = "UnitFrame", } Miscellaneous Comment Tags eMail The eMail Address of the Author - Used by WoW Addon Manager. ## eMail: Author@Domain.com URL The Homepage address of the Author or Addon - Used by WoW Addon Manager. ## URL: http://wow.mywebsite.com/ = Example .toc file = ## Interface: 1800 ## Title : My AddOn ## Notes: This AddOn does nothing but display a frame with a button ## Author: My Name ## eMail: Author@Domain.com ## URL: http://www.wowwiki.com/ ## Version: 1.0 ## Dependencies: Sea ## OptionalDeps: Chronos ## DefaultState: enabled ## SavedVariables: settingName, otherSettingName myAddOn.xml MyFrame.xml MyButton.xml = See Also = * API GetAddOnDependencies * API GetAddOnInfo * API GetAddOnMetadata Category:Interface Customization